#coding=utf-8;
import os;

'''
Created on 2017年10月16日

@author: hadoop
'''

#打印
print ("Hello World!");

#基本变量
a = 5;
print a;

b = 10.0;
print b;

name = "朱毅";
print name;

a = b = c = 10;
print a,b,c;

#标准变量类型
student_name = "学生姓名";
student_age = 20;
student_books = [];
student_books.insert(0, "语文");
student_books.append("数学");

#判断语句
print student_books[1];
for item in range(0,student_books.__len__()):
    print student_books[item]

print "------"
for item in range(len(student_books)):
    print student_books[item]

print "------"
for item in student_books:
    print item
    

for item in "student_books":
    print item,
    
print    

#判断语句
if(1==1):
    print ('true') ;
else:
    print ('false') ;
    
#函数
def eat(food):
    print("吃"+food);
    return;
eat("苹果");

def mysum(a,b):
    return a+b;
print(mysum(1,2));

def do_sum():
    a1 = raw_input("请输入a");
    b1 = raw_input("请输入b");
    return (int(a1)+int(b1));
#print(do_sum());

#创建文件夹
#os.mkdir("test");
#os.rmdir("test");
myfile = open("C:/Users/Administrator/Desktop/test.txt", "a+" ,0);
for i in range(0,10):
    myfile.write("你好！\n");
myfile.flush();
myfile.close();

myfile = open("C:/Users/Administrator/Desktop/test.txt", "r" ,0);
print(myfile.read());
#print (myfile.readline());
print(myfile.name);
myfile.close();
